package zry.User;

import zry.Operate.Delete;
import zry.Operate.Search;
import zry.Operate.Update;
import zry.Operate.Apply;

import java.util.Scanner;

public class StudentUser {

    public void StudentAchievementSystem(String userid, String student_type) {
        System.out.println("——————————————————————\n欢迎使用成果认定子系统");
        lable:
        while (true) {
            System.out.println("——————————————————————\n" +
                    "请输入需要的操作\n" +
                    "1.查看本人的成果认定情况\n" +
                    "2.提交申请\n" +
                    "3.查看某条申请的详细内容\n" +
                    "4.修改已提交的申请（只能修改未经审核的申请）\n" +
                    "5.删除已提交的申请（只能删除未经审核的申请）\n" +
                    "6.退出成果认定子系统\n");
            Scanner scanner = new Scanner(System.in);
            String input = scanner.nextLine();
            switch (input) {
                case "1":
                    new Search().searchAllMyAchievement(userid);
                    break;
                case "2":
                    new Apply().addApplyAchievement(userid, student_type);
                    break;
                case "3":
                    new Search().searchMyAchievement(userid);
                    break;
                case "4":
                    new Update().updateApplyAchievement(userid);
                    break;
                case "5":
                    new Delete().deleteApplyAchievement(userid);
                    break;
                case "6":
                    break lable;
                default:
                    System.out.println("输入错误，请输入1-6的数字");
                    break;
            }
        }
    }
}
